<?php

namespace App\Models;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;

class FormDatum extends Model
{

    protected $casts = [
        'data' => 'json'
    ];
    protected $fillable = [
        'name',
        'phone',
        'source',
        'url',
        'data',
    ];

    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
    }
}
